USE [bmig_Mensual_Post_cadena]
GO

IF EXISTS (SELECT name FROM   sysobjects WHERE  name = 'WASP_M0011_CREATBL_CodValSalud' AND type = 'P')
    DROP PROCEDURE [dbo].[WASP_M0011_CREATBL_CodValSalud]
GO

CREATE PROCEDURE [dbo].[WASP_M0011_CREATBL_CodValSalud]

AS


BEGIN
			if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[codvalSalud]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
			drop table [dbo].[codvalSalud]

			CREATE TABLE [codvalSalud] (
				[ppsuc] [int] NOT NULL ,
				[ppcta] [int] NOT NULL ,
				[ppoper] [int] NOT NULL ,
				[cod_seg1] [decimal](17, 2) NULL ,
				[val_seg1] [decimal](17, 2) NULL ,
				[cod_seg2] [decimal](17, 2) NULL ,
				[val_seg2] [decimal](17, 2) NULL ,
				[cod_seg3] [decimal](17, 2) NULL ,
				[val_seg3] [decimal](17, 2) NULL ,
				[cod_seg4] [decimal](17, 2) NULL ,
				[val_seg4] [decimal](17, 2) NULL ,
				[cod_seg5] [decimal](17, 2) NULL ,
				[val_seg5] [decimal](17, 2) NULL ,
				[cod_seg6] [decimal](17, 2) NULL ,
				[val_seg6] [decimal](17, 2) NULL ,
				[cod_seg7] [decimal](17, 2) NULL ,
				[val_seg7] [decimal](17, 2) NULL ,
				[cod_seg8] [decimal](17, 2) NULL ,
				[val_seg8] [decimal](17, 2) NULL ,
				[cod_seg9] [decimal](17, 2) NULL ,
				[val_seg9] [decimal](17, 2) NULL 
			) ON [PRIMARY]

END